Lesson 6 - advanced exercise

For each scenario write code to solve it.

Scenario - Create a star field of 100 stars. Each star will have its own speed and position. The stars will travel from left to right and when they go off screen they will start at the far right with a new position and speed. (chosen randomly). To help you can use lists within lists. For example the list may look like [ [54,21,1], [43,102, 2],..... [x, y, speed] ]

Toggle answer

Scenario - Have a character which can move by using keys and have a baddie which is moving towards the character at all times. If they collide then the game is over. Overtime the score gets increased by 10 points.

Toggle answer